import { format } from "date-fns";

export class InfoDataModel {
  id!: string;
  author!: string;
  title!: string;
  avatar!: string;
  updateTime!: Date;
  publishTime!: Date;
  settleType!: string;
  employType!: string;
  employNum!: string;
  content!: string;
  contact!: string;
  contactP!: string;

  public getContent(): string {
    return this.content;
  }

  public setContent(content: string): void {
    this.content = content;
  }

  public getContact(): string {
    return this.contact;
  }

  public setContact(contact: string): void {
    this.contact = contact;
  }

  public getContactP(): string {
    return this.contactP;
  }

  public setContactP(contactP: string): void {
    this.contactP = contactP;
  }

  public getSettleType(): string {
    return this.settleType;
  }

  public setSettleType(settleType: string): void {
    this.settleType = settleType;
  }

  public getEmployType(): string {
    return this.employType;
  }

  public setEmployType(employType: string): void {
    this.employType = employType;
  }

  public getEmployNum(): string {
    return this.employNum;
  }

  public setEmployNum(employNum: string): void {
    this.employNum = employNum;
  }

  public getId(): string {
    return this.id;
  }

  public setId(id: string): void {
    this.id! = id;
  }

  public getAuthor(): string {
    return this.author;
  }

  public setAuthor(author: string): void {
    this.author = author;
  }

  public getTitle(): string {
    return this.title;
  }

  public setTitle(title: string): void {
    this.title = title!;
  }

  public getAvatar(): string {
    return this.avatar;
  }

  public setAvatar(avatar: string): void {
    this.avatar = avatar;
  }

  public getUpdateTime(): Date {
    return this.updateTime;
  }

  public setUpdateTime(updateTime: Date): void {
    this.updateTime = updateTime;
  }

  public getFormatDate(): string {
    return format(this.updateTime, "yyyy-MM-dd HH:mm:ss");
  }

  public setPublishTime(publishTime: Date): void {
    this.publishTime = publishTime;
  }

  public getPublishTime(): string {
    return format(this.publishTime, "yyyy-MM-dd HH:mm:ss");
  }
}
